#ifndef OPTIONS_H
#define OPTIONS_H

#include "Ini_File.h"

struct Ini_Option_t
{
	char	log_dir[128];
	char	log_prename[32];
	int 	log_size;
	int		log_num;
	short	log_priority;

	int		socket_timeout;
	int		backlog;
	
	char	ip_out[16];
	int		port_out;
	int		socket_bufsize_out;
	char	ip_in[16];
	int		port_in;
	int		socket_bufsize_in;

	char	mysql_ip[16];
	char	mysql_user[16];
	char	mysql_passwd[16];
	char	mysql_db[16];
	int		mysql_port;
};

class Option
{
public:
	Option();
	~Option();

	int init(const char* config_file);
	
	int bind_count;
protected:
	int	parse_ini();

	IniFile ini_file;
};

extern Ini_Option_t ini;
extern Option option;
#endif

